package cn.ctyun.ipush.service.impl;

import cn.ctyun.ipush.dao.SaleDao;
import cn.ctyun.ipush.model.HbbtSalesHisModel;
import cn.ctyun.ipush.service.SaleService;
import cn.ctyun.ipush.utils.DBUtils;
import com.dexcoder.dal.build.Criteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 17-5-10
 * Time: 上午9:44
 * To change this template use File | Settings | File Templates.
 */
@Service
public class SaleServiceImpl implements SaleService {

    @Autowired
    private SaleDao saleDao;


    @Override
    public void save(HbbtSalesHisModel hbbtSalesHisModel) {
         saleDao.save(hbbtSalesHisModel);
    }

    @Override
    public List<HbbtSalesHisModel> queryListByPage(int currentPage, int itemPages, Criteria criteria) {
        return saleDao.queryListByPage(currentPage, itemPages, criteria);  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public List queryListBySql(String url, String username, String password, String sql) {
        return DBUtils.queryListBySql(url, username, password, sql);  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public int delete(String hbbtSalesHisModelId) {
        return saleDao.delete(hbbtSalesHisModelId);
    }

    @Override
    public int update(HbbtSalesHisModel hbbtSalesHisModel) {
        return saleDao.update(hbbtSalesHisModel);
    }

    @Override
    public HbbtSalesHisModel querySingleResult(String hbbtSalesHisModelId) {
        return saleDao.querySingleResult(hbbtSalesHisModelId);
    }

    @Override
    public List<HbbtSalesHisModel> queryList(HbbtSalesHisModel hbbtSalesHisModel) {
        return saleDao.queryList(hbbtSalesHisModel);
    }

    @Override
    public List<HbbtSalesHisModel> queryAll(HbbtSalesHisModel hbbtSalesHisModel) {
        return saleDao.queryAll(hbbtSalesHisModel);
    }

    @Override
    public List<HbbtSalesHisModel> queryList(Criteria criteria) {
        return saleDao.queryList(criteria);
    }

}
